home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
EDUCMISC
/
EDPAK_2.LZH
/
FLASH.BAS
< prev
next >
Wrap
BASIC Source File
|
1984-01-31
|
21KB
|
735 lines
4 DEFINT A-W,Y-Z
35 DIM K$(80)
40 DIM FLGV(2500)
70 CH = 29
75 PRINT FRE(0)
80 GOSUB 50000
100 GOSUB 52000
200 GOTO 40000
500 REM ******* CLS
510 CLS
520 RETURN
7000 REM FIND LENGTH OF WORD
7010 MAX = 0
7020 MAX = MAX + 1
7030 IF MID$(WD$,MAX,1) = " " THEN RETURN
7040 GOTO 7020
8000 REM ***** FILE NAME ACCEPLABLE TEST ************
8010 TEST = 1
8100 FOR Q = 1 TO LEN(A$)
8110 K$(Q) = MID$(A$,Q,1)
8120 C = ASC(K$(Q))
8130 IF C < 48 OR C > 122 THEN TEST = 4
8140 IF Q = 1 AND ( C < 65 OR C > 122 ) THEN TEST = 4
8150 NEXT Q
8190 RETURN
9000 REM OPEN DATA FILE
9010 OPEN "R",#2,"CARDS",128
9020 FIELD #2,28 AS WD$,50 AS DF1$,50 AS DF2$
9030 MRN = LOF(2)/128
9050 RETURN
9100 REM open and read flag file
9105 K = 1
9110 ON ERROR GOTO 9500
9120 OPEN "I",#3,"FLAG"
9125 ON ERROR GOTO 0
9127 INPUT #3,RN,MI
9130 IF EOF(3) THEN 9200
9140 INPUT #3, FLGV(K)
9150 K = K + 1
9160 GOTO 9130
9200 CLOSE #3
9205 GOSUB 9400
9210 RETURN
9300 REM open and read flag file
9305 K = 1
9310 ON ERROR GOTO 9500
9320 OPEN "I",#3,"SFLAG"
9325 ON ERROR GOTO 0
9327 INPUT #3,RN,MI
9330 IF EOF(3) THEN 9200
9340 INPUT #3, FLGV(K)
9350 K = K + 1
9360 GOTO 9330
9400 REM cont number of times missed
9405 GOSUB 9470
9410 FOR T = 1 TO MRN
9420 R = FLGV(T)
9430 IF R > 8 THEN R = 8
9440 KTM(R) = KTM(R) + 1
9450 NEXT T
9460 RETURN
9470 REM SET KTM(R) TO 0
9475 FOR T = 0 TO 8
9480 KTM(T) = 0
9485 NEXT T
9490 RETURN
9500 REM FILE NOT FOUND
9510 PRINT " THE FILE WITH YOUR PAST RESULTS HAS NOT BEEN FOUND"
9520 ON ERROR GOTO 0
9550 GOSUB 60000
9560 RETURN
9600 REM WRITE FLAG FILE
9610 PRINT " WRITING INFORMATION ON DISK, PLEASE WAIT"
9620 OPEN "O",#3,"FLAG"
9625 WRITE #3, RN, MI
9630 FOR T = 1 TO MRN
9640 WRITE #3, FLGV(T)
9645 REM PRINT FLGV(T)
9650 NEXT T
9655 CLOSE #3
9660 RETURN
9700 REM WRITE FLAG FILE
9710 PRINT " WRITING INFORMATION ON DISK, PLEASE WAIT"
9720 OPEN "O",#3,"SFLAG"
9725 WRITE #3, RN, MI
9730 FOR T = 1 TO MRN
9740 WRITE #3, FLGV(T)
9750 NEXT T
9755 CLOSE #3
9760 RETURN
10000 REM CONVERT FILES
10010 GOSUB 500
10100 PRINT " THIS PROGRAM CONVERTS FILES FROM SEQUENTIAL FILES"
10110 PRINT " TO RANDOM ACCESS FILES TO USE IN THIS PROGRAM "
10120 PRINT " "
10130 PRINT " YOU ONLY NEED TO USE THIS OPTION IF YOU ARE ADDING WORDS TO THE PROGRAM "
10140 PRINT ""
10150 PRINT "ENTER THE NAME OF THE FILE YOU WANT TO CONVERT "
10160 PRINT "JUST PRESS RETURN IF YOU DO NOT WANT TO CONVERT ANY FILES "
10170 MAX = 8
10180 GOSUB 62030
10190 IF A$ = "" THEN 40000
10200 GOSUB 8000
10210 IF TEST = 4 THEN 10000
10400 OPEN "I",#1,A$
10500 GOSUB 9000
10550 RN = 0
10600 IF EOF(1) = -1 THEN 10900
10610 LINE INPUT #1,WI$
10612 LINE INPUT #1,DI1$
10614 LINE INPUT #1,DI2$
10625 LSET WD$ = WI$
10630 PRINT WD$; "----"
10635 LSET DF1$ = DI1$
10640 PRINT DF1$
10645 LSET DF2$ = DI2$
10647 PRINT DF2$
10650 RN = RN + 1
10675 IF LEN(DI1$) > 50 AND MID$(DI1$,51,1) >< " " THEN GOSUB 10920
10678 IF LEN(DI2$) > 50 AND MID$(DI2$,51,1) >< " " THEN GOSUB 10920
10700 PUT #2,RN
10710 GOTO 10600
10900 CLOSE
10910 GOTO 40000
10920 IF INKEY$ = "" THEN 10920
10930 RETURN
10950 REM START FLASH CARDS
10960 GOSUB 9000
10965 GOSUB 9100
10970 GOSUB 23000
10975 GOSUB 13000
10980 RGT = 0
10990 WRG = 0
11000 IF FLGV(RN) < MI THEN 16000
11003 GET #2,RN
11005 GOSUB 500
11010 IF RV = 1 THEN PRINT WD$;TAB(35)" 0 - exit ";TAB (50) "RIGHT"; RGT;" WRONG ";WRG
11012 IF RV = 2 THEN PRINT DF1$;TAB(35) " 0 - exit ";TAB (50) "RIGHT"; RGT;" WRONG ";WRG
11014 IF RV = 2 THEN PRINT DF2$
11020 GOSUB 12000
11030 GOSUB 60000
11040 IF DT# < 0 OR DT# > 6 THEN 11030
11045 IF DT# = 0 THEN 18000
11100 IF DT# = T THEN 14000 ELSE 15000
12000 REM print random options on screen
12010 T = INT(RND * 7 + 1 )
12020 IF T = 7 THEN 12010
12030 FOR N = 1 TO 6
12040 RNT= INT(RND * MRN + 1)
12050 IF RNT = RN THEN 12040
12060 PRINT N
12063 IF N >< T THEN 12100
12065 GET #2,RN
12070 IF RV = 1 THEN PRINT DF1$
12080 IF RV = 1 THEN PRINT DF2$
12085 IF RV = 2 THEN PRINT WD$
12087 IF RV = 2 THEN PRINT ""
12090 GOTO 12200
12100 GET #2,RNT
12110 IF RV = 1 THEN PRINT DF1$ ELSE PRINT WD$
12120 IF RV = 1 THEN PRINT DF2$
12130 IF RV = 2 THEN PRINT ""
12200 NEXT N
12300 RETURN
13000 REM reverse
13010 GOSUB 500
13020 PRINT "******* HOW DO YOU WANT THE QUESTIONS ASKED ******* "
13030 PRINT " 1 - SHOW PROMPT, MULTIPLE CHOICE OF DESCRIPTIONS "
13040 PRINT " 2 - SHOW DESCRIPTION, MULTIPLE CHOICE OF PROMPTS "
13050 PRINT "******** ENTER THE NUMBER THEN PRESS RETURN *******"
13060 GOSUB 60000
13070 IF DT# < 1 OR DT# > 2 THEN 13000
13080 RV = DT#
13100 RETURN
14000 REM KNOWS SUBROUTINE"
14100 PRINT " RIGHT AGAIN "
14105 IF INKEY$ = "" THEN 14105
14110 RGT = RGT + 1
14500 GOTO 16000
15000 REM DONT KNOW SUBROUTINE
15020 PRINT " WRONG "
15030 PRINT " THE CORRECT ANSWER IS ";T
15040 WRG = WRG + 1
15050 IF INKEY$ = "" THEN 15050
15100 FLGV(RN) = FLGV(RN) + 1
15500 GOTO 16000
16000 REM CONTINUE
16100 RN = RN + 1
16110 IF RN > MRN THEN 17000
16500 GOTO 11000
17000 REM END OF CARDS
17010 GOSUB 39000
17300 RN = 1
17305 IF DT# = 2 THEN 11000
17310 MI = 0
17400 GOSUB 9600
17500 GOTO 40000
18000 REM
18100 PRINT "********** DO YOU WANT TO ****************"
18110 PRINT " 1 - EXIT "
18120 PRINT " 2 - CONTINUE "
18130 PRINT "*** ENTER THE NUMBER THEN PRESS RETURN ***"
18140 GOSUB 60000
18150 IF DT# > 2 OR DT# < 1 THEN 18000
18160 IF DT# = 2 THEN 11000
18165 GOSUB 9600
18170 GOTO 40000
20000 REM START FLASH CARDS
20100 GOSUB 9000
20110 GOSUB 9100
20130 GOSUB 23000
20500 REM reverse
20510 GOSUB 500
20520 PRINT "******* DO YOU WANT TO SEE THE CARDS *******"
20530 PRINT " 1 - PROMPT FIRST "
20540 PRINT " 2 - DESCRIPTION FIRST "
20550 PRINT "**** ENTER THE NUMBER THEN PRESS RETURN ****"
20560 GOSUB 60000
20570 IF DT# < 1 OR DT# > 2 THEN 20560
20580 RV = DT#
21000 IF FLGV(RN) < MI THEN 26000
21002 IF T = RN THEN 21005
21003 GET #2,RN
21005 GOSUB 500
21010 IF RV = 1 THEN PRINT WD$
21012 IF RV = 2 THEN PRINT DF1$
21014 IF RV = 2 THEN PRINT DF2$
21016 IF RV = 2 THEN PRINT ""
21020 T$ = INKEY$
21022 IF T$ = "" THEN 21020
21025 IF T$ = "K" OR T$ = "k" THEN 24000
21027 IF T$ = "E" OR T$ = "e" THEN 28000
21030 IF RV = 1 THEN PRINT DF1$
21035 IF RV = 2 THEN PRINT WD$
21040 IF RV = 1 THEN PRINT DF2$
21042 PRINT ""
21043 GOSUB 27600
21045 T$ = INKEY$
21050 IF T$ = "" THEN 21045
21100 IF T$ = "K" OR T$ = "k" THEN 24000
21110 IF T$ = "D" OR T$ = "d" THEN 25000
21115 IF T$ = "E" OR T$ = "e" THEN 28000
21118 PRINT "PRESS D - don't know or K - know E - exit "
21120 GOTO 21045
23000 REM ask which ones you want to review
23010 GOSUB 500
23055 GOSUB 23500
23058 PRINT ""
23060 PRINT "YOU MAY REVIEW CARDS THAT WERE MISSED X NUMBER OF TIMES OR MORE "
23070 PRINT "ENTER 0 IF YOU WANT TO REVIEW ALL CARDS "
23100 GOSUB 60000
23110 MI = DT#
23200 PRINT "WHICH CARD DO YOU WANT TO START/CONTINUE AT"
23205 IF RN < 1 THEN RN = 1
23210 PRINT "COMPUTER RECCOMENDS ";RN
23215 IF RN > 1 THEN PRINT "YOU ENDED YOUR LAST REVIEW ON CARD NUMBER ";RN
23220 GOSUB 60060
23230 IF DT# < 1 OR DT# >MRN THEN 23200
23235 RN = DT#
23240 RETURN
23500 REM PRINT NUMBER OF TIMES MISSED
23510 FOR T = 0 TO 7
23520 PRINT "TOTAL CARDS MISSED ";T;" TIMES IS ";KTM(T)
23530 NEXT T
23535 PRINT "TOTAL CARDS MISSED >7 TIMES IS ";KTM(8)
23540 RETURN
24000 REM KNOWS SUBROUTINE"
24500 GOTO 26000
25000 REM DONT KNOW SUBROUTINE
25100 FLGV(RN) = FLGV(RN) + 1
25500 GOTO 26000
26000 REM CONTINUE
26100 RN = RN + 1
26110 IF RN > MRN THEN 27000
26500 GOTO 21000
27000 REM END OF CARDS
27100 GOSUB 39000
27300 RN = 1
27305 IF DT# = 2 THEN 21000
27310 MI = 0
27400 GOSUB 9600
27500 GOTO 40000
27600 REM GET RECORD IN ADVANCE
27610 T = RN + 1
27620 IF T > MRN THEN RETURN
27630 IF MI <= FLGV(T) THEN 27700
27640 T = T + 1
27650 GOTO 27620
27700 GET #2,T
27710 RETURN
28000 REM
28100 PRINT "********** DO YOU WANT TO ****************"
28110 PRINT " 1 - EXIT "
28120 PRINT " 2 - CONTINUE WITH THE CARDS "
28130 PRINT "*** ENTER THE NUMBER THEN PRESS RETURN ***"
28140 GOSUB 60000
28150 IF DT# > 2 OR DT# < 1 THEN 28000
28160 IF DT# = 2 THEN 21000
28170 GOSUB 9600
28200 GOTO 40000
30000 REM START SPELLING
30100 GOSUB 9000
30110 GOSUB 9300
30120 GOSUB 23000
30200 REM
31000 IF FLGV(RN) < MI THEN 36000
31003 GET #2,RN
31005 GOSUB 500
31010 PRINT DF1$;TAB(60)"E - EXIT"
31012 PRINT DF2$
31015 K1$= LEFT$(WD$,1)
31018 PRINT ""
31020 PRINT TAB(2) K1$
31030 GOSUB 7000
31035 MAX = MAX - 1
31040 GOSUB 62030
31050 IF A$ = "E" OR A$ = "e" THEN GOTO 38000
31100 IF A$ = LEFT$(WD$,MAX) THEN 34000 ELSE 35000
34000 REM KNOWS SUBROUTINE"
34010 PRINT " RIGHT "
34100 IF INKEY$ = "" THEN 34100
34500 GOTO 36000
35000 REM DONT KNOW SUBROUTINE
35010 PRINT TAB(2) WD$
35020 PRINT " WRONG "
35030 IF INKEY$ = "" THEN 35030
35035 FLGV(RN) = FLGV(RN) + 1
35500 GOTO 36000
36000 REM CONTINUE
36100 RN = RN + 1
36110 IF RN > MRN THEN 37000
36500 GOTO 31000
37000 REM END OF CARDS
37060 RN = 1
37065 GOSUB 39000
37070 IF DT# = 2 THEN 31000
37080 MI = 1
37100 GOSUB 9700
37130 GOTO 40000
38000 REM exit the spelling checker
38100 PRINT "************ DO YOU WANT TO **************"
38110 PRINT " 1 - EXIT "
38120 PRINT " 2 - CONTINUE WITH THE CARDS "
38130 PRINT "*** ENTER THE NUMBER THEN PRESS RETURN ***"
38140 GOSUB 60000
38150 IF DT# > 2 OR DT# < 1 THEN 38000
38160 IF DT# = 2 THEN 31000
38170 GOSUB 9700
38200 GOTO 40000
39000 REM END OF FILE
39100 PRINT "**** END OF FLASH CARDS ON THIS DISK *****"
39110 PRINT " DO YOU WANT TO "
39120 PRINT " 1 - RETURN TO MAIN MENU "
39130 PRINT " 2 - RUN THROUGH THE SAME CARDS AGAIN "
39140 PRINT "*** ENTER THE NUMBER THEN PRESS RETURN ***"
39150 GOSUB 60000
39160 IF DT# < 1 OR DT# > 2 THEN 39150
39300 RETURN
40000 REM ******* INITIAL MENU *********
40030 CLOSE
40060 GOSUB 500
40080 PRINT "**************** FLASH CARD MENU ******************"
40100 PRINT ""
40120 PRINT " 0 - EXIT TO OPERATING SYSTEM"
40125 PRINT ""
40140 PRINT " 1 - FLASH CARDS "
40145 PRINT ""
40160 PRINT " 2 - MULTIPLE CHOICE "
40165 PRINT ""
40180 PRINT " 3 - SPELLING REVIEW "
40185 PRINT ""
40200 PRINT " 4 - PRINT CARDS ON PAPER "
40205 PRINT ""
40220 PRINT " 5 - CONVERT FILES "
40240 PRINT ""
40245 PRINT " 6 - RESET MISSED WORDS TO 0 "
40250 PRINT ""
40260 PRINT "********* ENTER THE NUMBER THEN PRESS RETURN ***********"
40280 GOSUB 60000
40282 IF DT# <0 OR DT# >6 GOTO 40280
40300 T = DT#
40310 IF T = 0 THEN 51000
40320 ON T GOTO 20000,10950,30000,41000,10000,42000
40340 GOSUB 500
41000 REM print words on paper
41100 GOSUB 9000
41110 GOSUB 500
41120 PRINT " DO YOU WANT TO PRINT:"
41130 PRINT " 1 - CARDS THAT YOU ARE HAVING RECOGNITION PROBLEMS WITH "
41140 PRINT " 2 - CARDS THAT YOU ARE HAVING SPELLING PROBLEMS WITH "
41150 PRINT " 0 - RETURN TO MAIN MENU
41160 PRINT " ENTER THE OPTION NUMBER THEN PRESS RETURN "
41170 GOSUB 60000
41180 IF DT# < 0 OR DT# > 2 THEN 41110
41185 IF DT# = 0 THEN 40000
41190 IF DT# = 1 THEN GOSUB 9100 ELSE GOSUB 9300
41195 GOSUB 41500
41300 GOSUB 23000
41305 PRINT " PRESS ANY KEY TO PAUSE "
41310 FOR T = 1 TO MRN
41312 IF INKEY$ >< "" THEN 41700
41315 IF FLGV(T) < MI THEN 41360
41320 GET #2,T
41330 PRINT WD$
41340 PRINT DF1$
41350 PRINT DF2$
41355 IF LPRT = 2 THEN GOSUB 41600
41360 NEXT T
41400 GOTO 40000
41500 REM ask lprint option
41510 PRINT "********* DO YOU WANT THE CARDS ************"
41520 PRINT " 1 - SHOWN ON THE SCREEN ONLY "
41530 PRINT " 2 - SHOWN ON THE SCREEN AND ON PAPER"
41540 PRINT "**** ENTER THE NUMBER THEN PRESS RETURN ****"
41560 GOSUB 60000
41570 IF DT# < 1 OR DT# >2 THEN 41560
41580 LPRT = DT#
41590 RETURN
41600 REM PRINT ON PAPER
41630 LPRINT WD$
41640 LPRINT DF1$
41650 LPRINT DF2$
41660 RETURN
41700 REM PAUSE SUBROUTINE
41710 PRINT "************ PAUSE SUBROUTINE ************ "
41720 PRINT " 1 - CONTINUE 2 - BACK TO MAIN MENU "
41725 PRINT "*** ENTER THE NUMBER THEN PRESS RETURN ***"
41730 GOSUB 60000
41740 IF DT# < 1 OR DT# > 2 THEN 41730
41750 IF DT# = 1 THEN 41312 ELSE 40000
42000 REM reset missed
42100 GOSUB 500
42110 PRINT " USE THIS NEW OPTION IF YOU ARE A NEW STUDENT "
42120 PRINT " THIS OPTION WILL RESET THE WORDS PREVIOUSLY MISSED TO NONE"
42130 PRINT ""
42140 PRINT " DO YOU WANT TO CLEAR ALL THE MISSES"
42150 PRINT " 1 - NO "
42160 PRINT " 2 - YES "
42165 PRINT " ENTER THE NUMBER THEN PRESS RETURN"
42170 GOSUB 60000
42180 IF DT# < 1 OR DT# > 2 THEN 42170
42190 IF DT# = 1 THEN 40000
42300 FOR T = 1 TO MRN
42310 FLGV(T) = 0
42320 NEXT T
42330 GOSUB 9600
42340 GOSUB 9700
42350 GOTO 40000
50000 REM ********** INTRO
50010 GOSUB 500
50100 PRINT " F L A S H C A R D P R O G R A M 1.0 "
50105 PRINT ""
50110 PRINT " Copyright 1985 by Potomac Pacific Engineering Inc."
50120 PRINT ""
50130 PRINT "This program is licensed FREE to all users with some restrictions"
50165 PRINT " See the manual for more information on the license."
50167 PRINT ""
50950 PRINT "****************** PRESS ANY KEY TO CONTINUE *****************";
50960 IF INKEY$ = "" GOTO 50960
50970 RETURN
51000 REM ***** EXIT TO SYSTEM
51050 REM GOSUB 9600
51100 GOSUB 500
51110 CLOSE
51120 PRINT " -BYE, Have a nice day"
51130 END
52000 REM ***** INTRO 1
52010 GOSUB 500
52100 PRINT " Put the disk with the files (cards) that you "
52105 PRINT " want to use in the defualt disk drive "
52110 PRINT ""
52120 PRINT " ***** THEN PRESS ANY KEY TO CONTINUE *****"
52130 PRINT ""
52140 PRINT "Keep it in the default disk drive at all times during this program."
52150 PRINT " The Flash Card program only uses the Default disk drive"
52200 IF INKEY$ = "" GOTO 52200
52210 RETURN
60000 REM ******* INTEGER LESS THEN 100 CHECK ********
60010 MAX = 2
60020 ACT$ = "1234567890=<>^"
60030 IF NE = 0 THEN ACT$ = "1234567890"
60040 PRINT ">__<";
60050 GOTO 60240
60060 REM ******* INTEGER *******
60070 MAX = 8
60080 ACT$ = "1234567890-+,=<>^"
60090 IF NE = 0 THEN ACT$ = "1234567890-+,"
60100 PRINT ">________<";
60110 GOTO 60240
60120 REM ******* SINGLE PRECISION *******
60130 MAX = 10
60140 ACT$ = "1234567890-+,.%$=<>^"
60150 IF NE = 0 THEN ACT$ = "1234567890+-,.%$"
60160 PRINT ">__________<";
60170 GOTO 60240
60180 REM ******* DOUBLE PRECISION *******
60190 MAX = 20
60200 ACT$ = "1234567890-+,.%$=<>^"
60210 IF NE = 0 THEN ACT$ = "1234567890+-,.%$"
60220 PRINT ">____________________<";
60230 GOTO 60240
60240 REM ********** NUMBER CHECK **********
60250 A$ = ""
60260 K$(20) = " "
60270 KTMAX = 0
60280 FOR T9 = 1 TO MAX
60290 K$(T9) = " "
60300 NEXT T9
60310 DIG$ = "1234567890."
60320 DOTFLG = 0
60330 T2 = MAX + 1
60340 FOR T6 = 1 TO T2
60350 PRINT CHR$(CH);
60360 NEXT T6
60370 IF INKEY$ = "" GOTO 60380 ELSE GOTO 60370
60380 KT = 0
60390 REM *********** CHECK ALFANUMERIC INPUT FOR LENGTH ***********
60400 KT = KT + 1
60410 REM
60420 W$ = INKEY$
60430 IF W$ = "" GOTO 60420
60440 C = ASC(W$)
60450 IF C = 0 THEN GOSUB 61900
60460 IF C = 13 GOTO 60580
60470 IF C = 17 OR C = 8 GOTO 61150
60480 IF C = 19 GOTO 60670
60490 IF C = 4 GOTO 60720
60500 IF C = 6 GOTO 60780
60510 IF C = 1 GOTO 60960
60520 IF KT > MAX GOTO 60410
60530 IF INSTR(ACT$,W$) = 0 GOTO 61230
60540 K$(KT) = W$
60550 PRINT K$(KT);
60560 IF KT > KTMAX THEN KTMAX = KT
60570 GOTO 60400
60580 REM ********** RETURN **********
60590 FOR T9 = 1 TO KTMAX
60600 A$ = A$ + K$(T9)
60610 NEXT T9
60620 IF KTMAX = 0 THEN PRINT "1"
60630 IF KTMAX = 0 THEN DT# = 1
60640 IF KTMAX = 0 THEN RETURN
60650 PRINT ""
60660 GOTO 61260
60670 REM ********* MOVE CURSE BACK ********
60680 IF KT = 1 GOTO 60410
60690 KT = KT - 1
60700 PRINT CHR$(CH);
60710 GOTO 60410
60720 REM ********* MOVE CURSER FORWARD *********
60730 IF KT >= MAX GOTO 60410
60740 IF KT > (KTMAX + 1) GOTO 60410
60750 PRINT K$(KT);
60760 KT = KT + 1
60770 GOTO 60410
60780 REM ********** INSERT ***********
60790 IF KT > KTMAX GOTO 60410
60800 X9 = MAX
60810 WHILE X9 > KT
60820 X9 = X9 - 1
60830 K$(X9 + 1) = K$(X9)
60840 WEND
60850 K$(KT) = " "
60860 KTMAX = KTMAX + 1
60870 IF KTMAX > MAX THEN KTMAX = MAX
60880 FOR T9 = KT TO KTMAX
60890 PRINT K$(T9);
60900 NEXT T9
60910 T6 = (KTMAX - KT) + 1
60920 FOR T7 = 1 TO T6
60930 PRINT CHR$(CH);
60940 NEXT T7
60950 GOTO 60410
60960 REM ********** DELETE ***********
60970 IF KT > KTMAX GOTO 60410
60980 IF KTMAX = 1 GOTO 60410
60990 K$(MAX + 1) = ""
61000 X9 = KT
61010 WHILE X9 <= MAX
61020 K$(X9) = K$(X9 + 1)
61030 X9 = X9 + 1
61040 WEND
61050 KTMAX = KTMAX - 1
61060 FOR T9 = KT TO KTMAX
61070 PRINT K$(T9);
61080 NEXT T9
61090 PRINT "_";
61100 T7 = (KTMAX - KT) + 2
61110 FOR T8 = 1 TO T7
61120 PRINT CHR$(CH);
61130 NEXT T8
61140 GOTO 60410
61150 REM ********* BACKSPACE ********
61160 IF KT = 1 GOTO 60410
61170 KT = KT - 1
61180 PRINT CHR$(CH);
61190 K$(KT) = " "
61200 PRINT "_";
61210 PRINT CHR$(CH);
61220 GOTO 60410
61230 REM ******* INPUT NOT ACCEPTABLE ********
61240 PRINT CHR$(7);
61250 GOTO 60420
61260 REM ********* CLEAR STRINGS ********
61270 MAX = LEN(A$)
61280 D2$ = ""
61290 D1$ = ""
61300 DFLG = 0
61310 FOR Q93 = 1 TO MAX
61320 R$ = MID$(A$,Q93,1)
61330 IF INSTR(DIG$,R$) = 0 GOTO 61400
61340 IF R$ = "." OR DFLG = 1 GOTO 61380
61350 IF DFLG = 1 GOTO 61380
61360 D2$ = D2$ + R$
61370 GOTO 61400
61380 D1$ = D1$ + R$
61390 DFLG = 1
61400 NEXT Q93
61410 DA# = VAL(D2$)
61420 D1# = VAL(D1$)
61430 DT# = DA# + D1#
61440 IF K$(1) = "-" THEN DT# = -DT#
61450 RETURN
61900 REM ****** CHECK FOR ASC0
61910 S4$ = INKEY$
61920 C2 = ASC(S4$)
61930 IF C2 = 83 THEN C = 1
61940 IF C2 = 82 THEN C = 6
61950 IF C2 = 75 THEN C = 19
61960 IF C2 = 77 THEN C = 4
61970 RETURN
62000 REM ********** ALPHANUMERIC CHECK **************
62010 MAX = FL(A,Q)
62020 GOTO 62040
62030 REM ******** MAX SET IN PROGRAM ********
62040 A$ = ""
62050 PRINT ">";
62060 FOR N9 = 1 TO MAX
62070 K$(N9) = ""
62080 PRINT "_";
62090 NEXT N9
62100 PRINT "<";
62110 T2 = MAX + 1
62120 FOR T4 = 1 TO T2
62130 PRINT CHR$(CH);
62140 NEXT T4
62150 KT = 0
62160 KTMAX = 1
62170 REM *********** CHECK ALFANUMERIC INPUT FOR LENGTH ***********
62180 KT = KT + 1
62190 PRINT TAB(KT+1)"";
62200 K$ = INKEY$
62210 IF K$ = "" GOTO 62200
62220 C = ASC(K$)
62230 IF C = 0 THEN GOSUB 61900
62240 IF C = 13 GOTO 62350
62250 IF C = 17 OR C = 8 GOTO 62920
62260 IF C = 19 GOTO 62450
62270 IF C = 4 GOTO 62500
62280 IF C = 6 GOTO 62560
62290 IF C = 1 GOTO 62730
62300 IF KT > MAX GOTO 62190
62310 K$(KT) = K$
62320 PRINT K$(KT);
62330 IF KT > KTMAX THEN KTMAX = KT
62340 GOTO 62180
62350 REM ********** RETURN **********
62360 FOR T9 = 1 TO MAX
62370 A$ = A$ + K$(T9)
62420 NEXT T9
62430 PRINT ""
62440 RETURN
62450 REM ********* MOVE CURSE BACK ********
62460 IF KT = 1 GOTO 62190
62470 KT = KT - 1
62480 PRINT CHR$(CH);
62490 GOTO 62190
62500 REM ********* MOVE CURSER FORWARD *********
62510 IF KT >= MAX GOTO 62190
62520 IF KT > KTMAX GOTO 62190
62530 PRINT K$(KT);
62540 KT = KT + 1
62550 GOTO 62190
62560 REM ********** INSERT ***********
62570 X9 = MAX
62580 WHILE X9 > KT
62590 X9 = X9 - 1
62600 K$(X9 + 1) = K$(X9)
62610 WEND
62620 K$(KT) = " "
62630 KTMAX = KTMAX + 1
62640 IF KTMAX > MAX THEN KTMAX = MAX
62650 FOR T9 = KT TO KTMAX
62660 PRINT K$(T9);
62670 NEXT T9
62680 T6 = (KTMAX - KT) +1
62690 FOR T7 = 1 TO T6
62700 PRINT CHR$(CH);
62710 NEXT T7
62720 GOTO 62190
62730 REM ********** DELETE ***********
62740 IF KT > KTMAX GOTO 62200
62750 IF KTMAX = 1 GOTO 62190
62760 K$(MAX + 1) = ""
62770 X9 = KT
62780 WHILE X9 <= KTMAX
62790 K$(X9) = K$(X9 + 1)
62800 X9 = X9 + 1
62810 WEND
62820 KTMAX = KTMAX - 1
62830 FOR T9 = KT TO KTMAX
62840 PRINT K$(T9);
62850 NEXT T9
62860 PRINT "_";
62870 T7 = (KTMAX - KT) + 2
62880 FOR T6 = 1 TO T7
62890 PRINT CHR$(CH);
62900 NEXT T6
62910 GOTO 62190
62920 REM ********* BACKSPACE ********
62930 IF KT = 1 GOTO 62190
62940 K$(KT) = " "
62950 KT = KT - 1
62960 K$(KT) = " "
62970 PRINT CHR$(CH);
62980 PRINT "_";
62990 PRINT CHR$(CH);
63000 GOTO 62190
" "
62950 KT = KT - 1
62960 K$(KT) = " "
62970 PRINT CHR$(CH);
62980 PRINT "_";
62990 PRINT CHR$(CH);
63000 GOTO 6219